home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-09-15 | 6.8 KB | 246 lines | [TEXT/MMCC] |
- // Tells PowerPlant to add our own class templates
- #define Include_User_Template
-
- #include $$Shell("RIncludes") "Types.r"
- #include $$Shell("RIncludes") "SysTypes.r"
- #include $$Shell("RIncludes") "PowerPlant.r" // put alias of it in RIncludes folder!
-
- #include "resources.h"
-
- #define kGeneva10_Txtr 130
-
- // ===========================================================================
- // • Menu resources
- // ===========================================================================
-
- resource 'MBAR' (128) {
- {
- 128, // Apple
- 129 // File
- }
- };
-
- resource 'MENU' (128) {
- 128, textMenuProc, allEnabled, enabled, apple,
- {
- "About List Demo…", noIcon, noKey, noMark, plain
- }
- };
-
- resource 'Mcmd' (128, "Apple") {
- {
- cmd_About
- }
- };
-
- resource 'MENU' (129) {
- 129, textMenuProc, 0x7FFFFB03, enabled, "File",
- {
- "Easy List", noIcon, noKey, noMark, plain,
- "Custom List", noIcon, noKey, noMark, plain,
- "Hierarchical List", noIcon, noKey, noMark, plain,
- "Disk List", noIcon, noKey, noMark, plain,
- "-", noIcon, noKey, noMark, plain,
- "Quit", noIcon, "Q", noMark, plain
- }
- };
-
- resource 'Mcmd' (129, "File") {
- {
- cmd_EasyList,
- cmd_CustomList,
- cmd_HierList,
- cmd_DiskList,
- cmd_Nothing,
- cmd_Quit
- }
- };
-
- // ===========================================================================
- // • Window & Pane resources : Easy List
- // ===========================================================================
-
- resource 'WIND' (EasyList_WIND, purgeable) {
- { 47, 17, 247, 317 },
- documentProc, // standard with size box & goAway
- visible, goAway,
- 0x0, // refCon
- "Easy List",
- noAutoCenter
- };
-
- resource 'PPob' (EasyList_PPob, purgeable) { {
-
- ObjectData { Window {
- EasyList_WIND, regular, hasCloseBox, hasTitleBar, hasResize, hasSizeBox, noZoom, hasShowNew,
- enabled, hasTarget, hasGetSelectClick, noHideOnSuspend, noDelaySelect, hasEraseOnUpdate,
- 100, 100, // Minimum width, height
- screenSize, screenSize, // Maximum width, height
- screenSize, screenSize, // Standard width, height
- 0 // UserCon
- } },
-
- BeginSubs {},
-
- ObjectData { ListBox {
- 1001, { 302, 202 }, visible, enabled, // paneID, { width, height }
- bound, bound, bound, bound, // bound edges to superview
- -1, -1, 0, defaultSuperView, // left, top, userRefCon
- hasHorizScroll, hasVertScroll, hasGrowBox, noFocusBox,
- 0, kGeneva10_Txtr, // double-click msg, text traits
- textList, // LDEF ID
- { "One", "Two", "Three", "Four", "Five" } // some sample data
- } },
-
- EndSubs {}
- } };
-
- // ===========================================================================
- // • Window & Pane resources : Custom List
- // ===========================================================================
-
- resource 'WIND' (CustomList_WIND, purgeable) {
- { 47, 17, 247, 317 },
- documentProc, // standard with size box & goAway
- visible, goAway,
- 0x0, // refCon
- "Custom List",
- noAutoCenter
- };
-
- resource 'PPob' (CustomList_PPob, purgeable) { {
-
- ObjectData { Window {
- CustomList_WIND, regular, hasCloseBox, hasTitleBar, hasResize, hasSizeBox, noZoom, hasShowNew,
- enabled, hasTarget, hasGetSelectClick, noHideOnSuspend, noDelaySelect, hasEraseOnUpdate,
- 100, 100, // Minimum width, height
- screenSize, screenSize, // Maximum width, height
- screenSize, screenSize, // Standard width, height
- 0 // UserCon
- } },
-
- BeginSubs {},
-
- ClassAlias { 'mlst' },
- ObjectData { ListBox {
- 1001, { 302, 202 }, visible, enabled, // paneID, { width, height }
- bound, bound, bound, bound, // bound edges to superview
- -1, -1, 0, defaultSuperView, // left, top, userRefCon
- hasHorizScroll, hasVertScroll, hasGrowBox, noFocusBox,
- 0, kGeneva10_Txtr, // double-click msg, text traits
- caller_LDEF, // LDEF ID
- { } // empty list
- } },
-
- EndSubs {}
- } };
-
- // ===========================================================================
- // • Window & Pane resources : Hierarchical Demo List
- // ===========================================================================
-
- resource 'WIND' (HierList_WIND, purgeable) {
- { 47, 17, 247, 317 },
- documentProc, // standard with size box & goAway
- visible, goAway,
- 0x0, // refCon
- "Hierarchical List",
- noAutoCenter
- };
-
- resource 'PPob' (HierList_PPob, purgeable) { {
-
- ObjectData { Window {
- HierList_WIND, regular, hasCloseBox, hasTitleBar, hasResize, hasSizeBox, noZoom, hasShowNew,
- enabled, hasTarget, hasGetSelectClick, noHideOnSuspend, noDelaySelect, hasEraseOnUpdate,
- 100, 100, // Minimum width, height
- screenSize, screenSize, // Maximum width, height
- screenSize, screenSize, // Standard width, height
- 0 // UserCon
- } },
-
- BeginSubs {},
-
- ClassAlias { 'Hlst' },
- ObjectData { ListBox {
- 1001, { 302, 202 }, visible, enabled, // paneID, { width, height }
- bound, bound, bound, bound, // bound edges to superview
- -1, -1, 0, defaultSuperView, // left, top, userRefCon
- hasHorizScroll, hasVertScroll, hasGrowBox, noFocusBox,
- 0, kGeneva10_Txtr, // double-click msg, text traits
- caller_LDEF, // LDEF ID
- { } // empty list
- } },
-
- EndSubs {}
- } };
-
- // ===========================================================================
- // • Window & Pane resources : Hierarchical Demo List
- // ===========================================================================
-
- resource 'WIND' (DiskList_WIND, purgeable) {
- { 47, 17, 247, 317 },
- documentProc, // standard with size box & goAway
- visible, goAway,
- 0x0, // refCon
- "Disk List",
- noAutoCenter
- };
-
- resource 'PPob' (DiskList_PPob, purgeable) { {
-
- ObjectData { Window {
- DiskList_WIND, regular, hasCloseBox, hasTitleBar, hasResize, hasSizeBox, noZoom, hasShowNew,
- enabled, hasTarget, hasGetSelectClick, noHideOnSuspend, noDelaySelect, hasEraseOnUpdate,
- 100, 100, // Minimum width, height
- screenSize, screenSize, // Maximum width, height
- screenSize, screenSize, // Standard width, height
- 0 // UserCon
- } },
-
- BeginSubs {},
-
- ObjectData { DiskListBox {
- 1001, { 302, 202 }, visible, enabled, // paneID, { width, height }
- bound, bound, bound, bound, // bound edges to superview
- -1, -1, 0, defaultSuperView, // left, top, userRefCon
- hasHorizScroll, hasVertScroll, hasGrowBox, noFocusBox,
- 0, kGeneva10_Txtr, // double-click msg, text traits
- caller_LDEF, // LDEF ID
- { } // empty list
- } },
-
- EndSubs {}
- } };
-
-
- // ===========================================================================
- // • Text style resources
- // ===========================================================================
-
- resource 'Txtr' (kGeneva10_Txtr, "Geneva 10") {
- 10,
- 0,
- flushDefault,
- srcOr,
- 0,
- 0,
- 0,
- useName,
- "Geneva"
- };
-
- // ===========================================================================
- // • Apple Event-related resources
- // ===========================================================================
-
- resource 'aedt' (128, "Required Suite") {
- {
- 'aevt', 'oapp', 1001,
- 'aevt', 'odoc', 1002,
- 'aevt', 'pdoc', 1003,
- 'aevt', 'quit', 1004
- }
- };
-